/*
 * @Description: 农业类型管理
 */
import zhreq from '@/api/axios';
export default {
  /**
   * @description: 获取所有物联摄像头列表 *代表必填
   * @param {String/Number} page
   * @param {String/Number} size
   */
  getbaseFarmingTypeList(params) {
    return zhreq.get(`v3/iot/platformCamera/queryByCompanyMark?companyMark=${params}`);
  },

  /**
   * @description: 获取所拥有摄像头列表 *代表必填
   * @param {Object}  *
   */
  ownFarmingTypelist(params) {
    return zhreq.post('/v3/40089-process-v2/camera/queryPageByCondition', params);
  },
  /**
   * @description: 批量拥有摄像头
   * @param {Object}  *
   */
  addFarmingTypelist(params) {
    return zhreq.post('/v3/40089-process-v2/camera/addBatch', params);
  },
  /**
   * @description: 批量拥有摄像头
   * @param {Object}  *
   */
  editFarmingTypelist(params) {
    return zhreq.post('/v3/40089-process-v2/camera/edit', params);
  },
  /**
   * @description: 批量删除拥有摄像头
   * @param {Object}  *
   */
  delFarmingTypelist(params) {
    return zhreq.get(`v3/iot/camera/del?cameraNo=${params}`);
  },
  /**
   * @description: 批量删除拥有摄像头
   * @param {Object}  *
   */
  delListFarmingTypelist(params) {
    return zhreq.post(`/v3/40089-process-v2/camera/delListByNo`, params);
  },
  /**
   * @description: 通过农场id查询农场所拥有的农业类型
   * @param {Object}  *
   */
  queryCondFarmingTypelist() {
    return zhreq.post('v3/organization/base/farmingType/queryByCondition', {
      // "companyId": localStorage.companyId
      organizationNo: sessionStorage.organizationNo
    });
  }
};
